package Global;

import java.io.IOException;
import java.io.Serializable;

public class UserObject implements Serializable
{
	public ContentType objType;
	public Object obj;
	public UserObject(ContentType type,Object o)
	{
		objType = type;
		obj = o;
	}
	private void writeObject(java.io.ObjectOutputStream out) throws IOException
	{
		out.defaultWriteObject();
		out.writeInt(objType.ordinal());
		out.writeObject(obj);
	}

	private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException
	{
		in.defaultReadObject();
		objType = ContentType.values()[in.readInt()];
		obj = in.readObject();
	}
}
